diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2025-09-27 10:29:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-27 10:29:42 +0200 |
commit | fcf79e5276299c351b924f7a08f6c3c6a6c6a1ee (patch) | |
tree | a44b312e001a8a3c0cd34290a10e39d479cef384 /auto& t | |
parent | e276000d0b8adadc228a6e93ea8911fbd879d2cd (diff) | |
download | llvm-main.zip llvm-main.tar.gz llvm-main.tar.bz2 |
When executed in the context of canonicalization, the folders are
invoked in a fixed-point iterative process. However in the context of an
API like `createOrFold()` or in DialectConversion for example, we expect
a "one-shot" call to fold to be as "folded" as possible. However, even
when folders themselves are indempotent, folders on a given operation
interact with each other. For example:
```
// X = 0 + Y
%X = arith.addi %c_0, %Y : i32
```
should fold to %Y, but the process actually involves first the folder
provided by the IsCommutative trait to move the constant to the right.
However this happens after attempting to fold the operation and the
operation folder isn't attempt again after applying the trait folder.
This commit makes sure we iterate until fixed point on folder
applications.
Fixes #159844
Diffstat (limited to 'auto& t')
0 files changed, 0 insertions, 0 deletions